<tagLib name="html" />

<include file="Public:header" />

<div class="container" id="cpcontainer">
    <div class="itemtitle">
        <h3>{$Think.lang.manage_users}</h3>
        <ul class="tab1">
            <li class="current"><a href="__URL__/userList"><span>{$Think.lang.manage_users}</span></a></li>
            <li><a href="__URL__/addUser"><span>{$Think.lang.add_user}</span></a></li>
            <li><a href="__URL__/approveUser"><span>{$Think.lang.approve_user}</span></a></li>
            <li><a href="__URL__/searchUser"><span>{$Think.lang.search_user}</span></a></li>
        </ul>
    </div>
    <p class="tips">{$Think.lang.manage_users_tips}</p>
    <form name="cpform" method="post" action="__URL__/deleteUser" id="cpform">
    <input type="hidden" name="op" value="save" />
    <table class="tb tb2 fixpadding tablesorter" id="myTable">
        <thead>
        <tr>
            <th>{$Think.lang.username}</th>
            <th>{$Think.lang.email}</th>
            <th>{$Think.lang.group_name}</th>
            <th>{$Think.lang.point_count}</th>
            <th>{$Think.lang.question_count}</th>
            <th>{$Think.lang.answer_count}</th>
            <th align="center">{$Think.lang.actions}</th>
            <th>{$Think.lang.mark}</th>
        </tr>
        </thead>
        <tbody>
        <notempty name="userList">
        <volist name="userList" id="vo">
        <tr class="item">
            <td><a href="{:format_user_url($vo['user_id'],$vo['username'])}" target="_blank">{$vo.username}</a></td>
            <td>{$vo.email}</td>
            <td><in name="vo.user_group" value="1,2,3"><b>{$vo.user_group|get_group_name}</b><else/>{$vo.user_group|get_group_name}</in></td>
            <td align="center">{$vo.point_count}</td>
            <td align="center">{$vo.question_count}</td>
            <td align="center">{$vo.answer_count}</td>
            <td align="center">
                <a class="act" href="__URL__/editUser/user_id/{$vo.user_id}" title="{$Think.lang.edit}">{$Think.lang.edit}</a>&nbsp;&nbsp;&nbsp;
                <a class="act" href="__APP__/Admin/Medal/userMedal/user_id/{$vo.user_id}" title="{$Think.lang.manage_user_medal}">{$Think.lang.medal}</a>
            </td>
            <td class="td25"><input type="checkbox" class="checkbox" name="mods[]" value="{$vo.user_id}" <eq name="vo.admin_group" value="1">disabled</eq>/></td>
        </tr>
        </volist>
        <else />
        <tr><td colspan="15" align="center">{$Think.lang.no_record}</td></tr>
        </notempty>
        </tbody>
        <tr class="nobg">
            <td colspan="7">
                <div class="cuspages left"><div class="pages">{$pagination}</div></div>
                <div class="fixsel right"><input type="submit" class="btn" name="modsubmit" value="{$Think.lang.delete_selected}" /></div>
            </td>
            <td width="10%"><input type="checkbox" name="chkall" id="chkall" class="checkbox" onclick="checkAll('prefix', this.form, 'mods')" /><label for="chkall">{$Think.lang.check_all}</label></td>
        </tr>
    </table>
    </form>
</div>

<script type="text/javascript">
$(function(){
    $("#myTable").tablesorter({
        headers:{
            6:{sorter:false},
            7:{sorter:false}
        }
    });
});
</script>

<include file="Public:footer" />
